package com.snopy.designPattern.structure.proxy.impl;

import com.snopy.designPattern.structure.proxy.inter.Image;

/**
 * @author snopy
 * @version 1.0.0
 * @classname ProxyImage
 * @description
 * @email 77912204@qq.com
 * @date 2022/03/03 21:05
 */
public class ProxyImage implements Image {
    private RealImage realImage;
    @Override
    public void display() {
        if (realImage==null){
            realImage = new RealImage();
        }
        realImage.display();
    }
}
